﻿@{
    ViewBag.Title = "项目";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
<link href="@Url.Content("~/Content/themes/base/datatable_ui.css")" rel="stylesheet" type="text/css" />
<script src="@Url.Content("~/Scripts/jquery.dataTables.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.dataTables.crud.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/Common/dataTablePipeline.js")" type="text/javascript"></script>
<script type="text/javascript">
    
    var datatablelang = {
        "sLengthMenu": "每页显示 _MENU_ 条记录",
        "sZeroRecords": "没有找到任何记录",
        "sInfo": "_START_ 到 _END_ - 共 _TOTAL_ 条记录",
        "sInfoEmpty": " 0 到 0 - 共 0 records",
        "sInfoFiltered": "(从 _MAX_ 条记录中过滤后的结果)",

        "sProcessing": "处理中...",
        "sEmptyTable": "表中没有可用数据",
        "sSearch": "搜索 :",
        "oPaginate": {
            "sFirst": "首页",
            "sPrevious": "上一页",
            "sNext": "下一页",
            "sLast": "末页"
        }
    };
    $(function () {
        $("table").dataTable({
            "bAutoWidth": false,
            "oSearch": { "sSearch": "", "bRegex": false, "bSmart": false },
            "bSort": false,
            "bLengthChange": true,
            "bInfo": true,
            "sPaginationType": "full_numbers",
            "bJQueryUI": true,
            "iDisplayLength": 10,
            "bServerSide": true,
            "bProcessing": true,
            "sAjaxSource": "/Project/List",
            "oLanguage": datatablelang,
            "aoColumnDefs": [
                 { "fnRender": function (oObj) { return "<a href='/Project/Details/" + oObj.aData[0] + "'>查看</a>"; }, "aTargets": [0] },
                 { "bSearchable": false, "aTargets": [0] },
                 { "bSearchable": false, "aTargets": [2] },
                 { "bSearchable": false, "aTargets": [3] },
                 { "bSearchable": false, "aTargets": [4] },
                 { "bSearchable": false, "aTargets": [5] }
             ]
        });
    });
</script>
<div id="content">
    <h2>项目</h2>
    <p>
        @Html.ActionLink("创建项目", "Create")
    </p>
    <table class="display">
        <thead>
        <tr>
            <th width="5%"></th>
            <th width="15%">项目名称</th>
            <th width="15%">领域</th>           
            <th width="10%">总设计师</th>
            <th width="10%">负责人</th>
            <th width="10%">创建日期</th>
        </tr>
        </thead>
        <tbody>

        </tbody>
        <tfoot>
        <tr>
            <th></th>
            <th>项目名称</th>
            <th>领域</th>      
            <th>总设计师</th>
            <th>负责人</th>
            <th>创建日期</th>
            </tr>
        </tfoot>
    </table>
</div>
